﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeFirstEntityConfiguration.Models.Post>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Edit Post</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Title) %>
    </div>
    <div class="editor-field">
        <%: Html.TextBoxFor(model => model.Title) %>
        <%: Html.ValidationMessageFor(model => model.Title) %>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.Body) %>
    </div>
    <div class="editor-field">
        <%: Html.TextAreaFor(model => model.Body, new { @readonly = true, rows = 10, cols = 80}) %>
        <%: Html.ValidationMessageFor(model => model.Body) %>
    </div>
    <div class="editor-field">
        <a href='#' id='lnkGetSelected' class="link">Get Selected</a>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.CreatedBy) %>
    </div>
    <div class="editor-field">
        <%: Html.TextBoxFor(model => model.CreatedBy) %>
        <%: Html.ValidationMessageFor(model => model.CreatedBy) %>
    </div>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.CreatedOn) %>
    </div>
    <div class="editor-field">
        <span><%: Model.CreatedOn %></span>
    </div>
    <p>
        <input type="submit" value="Save" />
    </p>
    <% } %>
    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
